<?php
	class StudentSchoolModel extends Model {
		function StudentSchoolModel()
		{
			parent::Model();			
		}
		
		function add($data)
		{
			$dataDB = array(
               	'student_id' => $data['student_id'] ,
				'shool_id' => $data['shool_id']
            );
			$this->db->insert('student_school', $dataDB);
			return $this->db->insert_id();
		}
		
		function delete($stuID)
		{
            $this->db->where('student_id', $stuID);
			$this->db->delete('student_school'); 
		}
		
		function getByID($stuID)
		{
			$query = $this->db->get_where('student_school', array('student_id' => $stuID));
			return $query->result();
		}
	}
?>